<!--
// +----------------------------------------------------------------------
// | Copyright (c) 2017 https://gitee.com/honoryao All rights reserved.
// +----------------------------------------------------------------------
// | Author: honoryao <2463523099@qq.com>
// +----------------------------------------------------------------------
// | Time: 2018/6/8   
// +----------------------------------------------------------------------
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Component 初识组件1</title>
</head>
<body>
<h1>Component 初识组件</h1>
<hr>
<div id="app">
    <jspang></jspang>
</div>
<script src="../assets/js/vue.js"></script>
<script type="text/javascript">
    //注册全局组件
    Vue.component('jspang', {
        template: `<div style="color:red;">全局化注册的jspang标签</div>`
    })
    var app = new Vue({
        el: '#app',
        data: {}
    })
</script>
<script type="text/javascript">
    var app = new Vue({
        el: '#app',
        components: {
            "panda": {
                template: `<div style="color:red;">局部注册的panda标签</div>`
            }
        }
    })
</script>
</body>
</html>